package com.swas.entity;

import java.io.Serializable;

/**
 * base_device
 * @author 
 */
public class BaseDevice implements Serializable {
    /**
     * 设备表
     */
    private Integer id;

    /**
     * 基建设施id
     */
    private Integer baseid;

    /**
     * 库存表中的设备id
     */
    private Integer stockid;

    /**
     * 使用数量
     */
    private Integer usenum;

    /**
     * 报废数
     */
    private Integer dumpingnum;

    /**
     * 总量
     */
    private Integer stocknum;

    /**
     * 一个设备类型的下的几个设备
     */
    private Integer stockchildid;

    /**
     * 同一设备的不同别名
     */
    private String childname;

    /**
     * 设备状态:良好,检修,报废
     */
    private String childstatus;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getBaseid() {
        return baseid;
    }

    public void setBaseid(Integer baseid) {
        this.baseid = baseid;
    }

    public Integer getStockid() {
        return stockid;
    }

    public void setStockid(Integer stockid) {
        this.stockid = stockid;
    }

    public Integer getUsenum() {
        return usenum;
    }

    public void setUsenum(Integer usenum) {
        this.usenum = usenum;
    }

    public Integer getDumpingnum() {
        return dumpingnum;
    }

    public void setDumpingnum(Integer dumpingnum) {
        this.dumpingnum = dumpingnum;
    }

    public Integer getStocknum() {
        return stocknum;
    }

    public void setStocknum(Integer stocknum) {
        this.stocknum = stocknum;
    }

    public Integer getStockchildid() {
        return stockchildid;
    }

    public void setStockchildid(Integer stockchildid) {
        this.stockchildid = stockchildid;
    }

    public String getChildname() {
        return childname;
    }

    public void setChildname(String childname) {
        this.childname = childname;
    }

    public String getChildstatus() {
        return childstatus;
    }

    public void setChildstatus(String childstatus) {
        this.childstatus = childstatus;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BaseDevice other = (BaseDevice) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getBaseid() == null ? other.getBaseid() == null : this.getBaseid().equals(other.getBaseid()))
            && (this.getStockid() == null ? other.getStockid() == null : this.getStockid().equals(other.getStockid()))
            && (this.getUsenum() == null ? other.getUsenum() == null : this.getUsenum().equals(other.getUsenum()))
            && (this.getDumpingnum() == null ? other.getDumpingnum() == null : this.getDumpingnum().equals(other.getDumpingnum()))
            && (this.getStocknum() == null ? other.getStocknum() == null : this.getStocknum().equals(other.getStocknum()))
            && (this.getStockchildid() == null ? other.getStockchildid() == null : this.getStockchildid().equals(other.getStockchildid()))
            && (this.getChildname() == null ? other.getChildname() == null : this.getChildname().equals(other.getChildname()))
            && (this.getChildstatus() == null ? other.getChildstatus() == null : this.getChildstatus().equals(other.getChildstatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBaseid() == null) ? 0 : getBaseid().hashCode());
        result = prime * result + ((getStockid() == null) ? 0 : getStockid().hashCode());
        result = prime * result + ((getUsenum() == null) ? 0 : getUsenum().hashCode());
        result = prime * result + ((getDumpingnum() == null) ? 0 : getDumpingnum().hashCode());
        result = prime * result + ((getStocknum() == null) ? 0 : getStocknum().hashCode());
        result = prime * result + ((getStockchildid() == null) ? 0 : getStockchildid().hashCode());
        result = prime * result + ((getChildname() == null) ? 0 : getChildname().hashCode());
        result = prime * result + ((getChildstatus() == null) ? 0 : getChildstatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", baseid=").append(baseid);
        sb.append(", stockid=").append(stockid);
        sb.append(", usenum=").append(usenum);
        sb.append(", dumpingnum=").append(dumpingnum);
        sb.append(", stocknum=").append(stocknum);
        sb.append(", stockchildid=").append(stockchildid);
        sb.append(", childname=").append(childname);
        sb.append(", childstatus=").append(childstatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}